﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/Admin.master" AutoEventWireup="true" CodeFile="terminate_account.aspx.cs" Inherits="terminate_account" %>

<asp:Content ID="Content3" ContentPlaceHolderID="leftMenu" Runat="Server">
<ul>
        
                    <li>
                   <a href="<%= Page.ResolveUrl("~/product/saving/admin/saving_withdrawal.aspx")%>">Savings Account</a></li>
                   <li><a href="<%= Page.ResolveUrl("~/product/fixed_deposit/admin/terminate_account.aspx")%>">Fixed Deposit Account</a></li>
                  
    </ul>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="content" Runat="Server">
 
     <h1>Fixed Deposit Withdraw</h1>
     <br />
       <asp:GridView ID="gvList" runat="server" BackColor="#DEBA84" 
         BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
         CellSpacing="2" DataSourceID="ListDataSource" AutoGenerateColumns="False" 
         DataKeyNames="SavingsAccountNo">
         <AlternatingRowStyle BackColor="White" />
           <Columns>
               
               <asp:BoundField DataField="SavingsAccountNo" HeaderText="Savings Account No" ReadOnly="True" 
                   SortExpression="SavingsAccountNo" />
                   <asp:TemplateField HeaderText="Depositor"   SortExpression="lastname">
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%#Eval("fName")+ " " + Eval("lName")%>' ></asp:Label>

                </ItemTemplate>

                </asp:TemplateField>
               <asp:BoundField DataField="fName" HeaderText="fName" SortExpression="fName" 
                   Visible="False" />
               <asp:BoundField DataField="lName" HeaderText="lName" SortExpression="lName" 
                   Visible="False" />
               <asp:BoundField DataField="DepositAmount" HeaderText="Deposit Amount" 
                   SortExpression="DepositAmount" />
                   <asp:BoundField DataField="SavingsAccountType" HeaderText="Savings Account Type" 
                   SortExpression="SavingsAccountType" />
               <asp:BoundField DataField="tenors" HeaderText="Tenors" 
                   SortExpression="tenors" />
               <asp:BoundField DataField="effectiveDate" DataFormatString="{0:d}" 
                   HeaderText="Effective Date" SortExpression="effectiveDate" />
               <asp:BoundField DataField="maturityDate" DataFormatString="{0:d}" 
                   HeaderText="Maturity Date" SortExpression="maturityDate" />
               <asp:BoundField DataField="withdrawDate" DataFormatString="{0:d}" 
                   HeaderText="Withdraw Date" SortExpression="withdrawDate" />
               
           </Columns>
           <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
           <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
           <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
           <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
           <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
           <SortedAscendingCellStyle BackColor="#FFF1D4" />
           <SortedAscendingHeaderStyle BackColor="#B95C30" />
           <SortedDescendingCellStyle BackColor="#F1E5CE" />
           <SortedDescendingHeaderStyle BackColor="#93451F" />
     </asp:GridView>
     <br />
     <fieldset style="background-color:#FFEBCD">
         <legend style="background-color:#E55B3C;">Withdrawal service</legend>
         <table>
             <tr>
                 <td>
                     Transfer 
                     amount S$:
                     <asp:TextBox ID="tbAmount" runat="server"></asp:TextBox>
                     &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                         ControlToValidate="tbAmount" ErrorMessage="Please under the amount" 
                         ForeColor="Red"></asp:RequiredFieldValidator>
                     <br />
                     <br />
                     Savings
                     Account Type:&nbsp;
                     <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True">
                         <asp:ListItem Value="ps">Power Save Account</asp:ListItem>
                         <asp:ListItem Value="ks">Kids Saver Account</asp:ListItem>
                     </asp:DropDownList>
                     <br />
                     &nbsp;<br />
                     Savings
                     Account Number:
                     <asp:TextBox ID="tbTo" runat="server"></asp:TextBox>
                     &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                         ControlToValidate="tbTo" ErrorMessage="Please enter the account number" 
                         ForeColor="Red"></asp:RequiredFieldValidator>
                     <br />
                     <br />
                 </td>
             </tr>
             <tr>
                 <td>
                     &nbsp;
                     <asp:Button ID="btnSubmit" runat="server" 
                         Text="Submit" onclick="btnSubmit_Click" />
                     <asp:Button ID="btnReset" runat="server" Text="Reset" 
                          />
                 </td>
             </tr>
         </table>
     </fieldset><br />
     <asp:SqlDataSource ID="ListDataSource" runat="server" 
         ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
         SelectCommand="SELECT [SavingsAccountNo], [fName], [lName], [DepositAmount],[SavingsAccountType], [tenors], [effectiveDate], [maturityDate],[withdrawDate] FROM [FIXED_DEPOSIT] WHERE (status='Terminating')">
     </asp:SqlDataSource>
    

</asp:Content>

